package top.tresman.cxxcommon.annotation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import top.tresman.cxxcommon.validator.MobileValidator;

import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = MobileValidator.class) // 指定校验器
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface ChkMobile {
    String message() default "手机号格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
